use $data/Table_5_Final.dta, replace

// TABLE 5
foreach i in control financial health{
quietly ttest energy if `i'==1 & energy>0, by(post)
local proper=proper("`i'")
local mean0=round(`r(mu_1)',.001)
local sd0=round(`r(sd_1)',.001)
local mean1=round(`r(mu_2)',.001)
local sd1=round(`r(sd_2)',.001)
local pval=round(`r(p)',.001)
display "`proper'&`mean0'&`mean1'&`pval'"
display "&(`sd0')&(`sd1')&"
}
//

// HEADER FOR TABLE 5

display "Group&Pre-Treatment&Post-Treatment&P-Value"
 
 
 
/*
// THIS DO FILE WILL PRODUCE THIS OUTPUT 
COPY AND PASTE THIS INTO WORD, HIGHLIGHT, AND CONVERT TEXT TO TABLE USING THE & AS THE DELIMITER

Group&Pre-Treatment&Post-Treatment&P-Value
Control&7.667&6.711&.069
&(10.973)&(8.329000000000001)&
Financial&6.008&5.736&.438
&(5.872)&(6.639)&
Health&14.45&12.08&0
&(12.045)&(10.712)&
